package taller2.controller.listeners.selectionMenu;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import taller2.model.graph.algorithms.TopologicDFSApplicator;
import taller2.utils.Constants;
import taller2.view.menus.SelectionMenu;
import taller2.view.windows.MyWindow;
import taller2.view.windows.MainWindows.TopologicDfsMainWindow;

public class TopologicDFSButtonListener implements ActionListener {
	
	private SelectionMenu menu;
	private MyWindow window;
	
	public TopologicDFSButtonListener(SelectionMenu menu, MyWindow window) {
		this.menu = menu;
		this.window = window;
	}
	
	public void actionPerformed(ActionEvent event) {
		String path = Constants.pseudocodePath + "pseudoCodigo_DFS_Topologico";
		//new MainWindow(path,true,new DFSApplicator());
		new TopologicDfsMainWindow(window,path,true,new TopologicDFSApplicator());		
		menu.unselectButtons();
	}
	
}
